package com.video.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Record implements Serializable {

    @TableId(type = IdType.AUTO)
    private int id;
    private String host;
    private int type;
    private String starttime;
    private String endtime;
    private String record;

    @TableField(exist = false)
    private List<String> users = new ArrayList<>();

    public void addUserId(int cid){
        users.add(String.valueOf(cid));
    }
}

